1 Contract Driven Development = Test Driven Development - Writing Test - Cases

نویسندگان

  • Andreas Leitner
  • Ilinca Ciupa
  • Manuel Oriol
  • Bertrand Meyer
  • Arno Fiva
چکیده

Although unit tests are recognized as an important tool in software development, programmers prefer to write code, rather than unit tests. Despite the emergence of tools like JUnit which automate part of the process, unit testing remains a time-consuming, resource-intensive, and not particularly appealing activity. This paper introduces a new method, called ContractDriven Development, that takes the task of writing unit tests o the developers' shoulders, while still taking advantage of the developers' knowledge of the intended semantics and structure of the code. This methodology exploits actions that programmers perform anyway as part of the normal process of writing code, by extracting test cases from failureproducing runs of the system that the programmers trigger. The approach is based on the presence of contracts in code, which act as the oracle of the test cases. The test cases are extracted completely automatically, run in the background when the code evolves, and can easily be maintained over versions. The tool implementing this methodology is called Cdd and is available both in binary and in source form.

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

Agile Specification-Driven Development

We present an agile approach to Specification-Driven Development, which combines features of Test-Driven Development and the plan-based approach of Design-by-Contract. We argue that both tests and contracts are different types of specifications, and both are useful and complementary for building high quality software. We conclude that it is useful for being able to switch between writing tests ...

متن کامل

Test driven development : Growing Object using test Nitin

Test driven development (TDD), also known as Test-First coding which is a practice where programmers write a production code only after writing a automated failing test case. This practice is primarily used in software development circle. In Growing Objects, using tests we implement Component Testing.

متن کامل

Introducing Software Test Automation and Test-Driven Development: An Experience Report

1 Dept. of Software Engineering and Computer Science, Blekinge Institute of Technology, Box 520, SE-372 25 Ronneby, Sweden. 2 Ericsson AB, Soft Center, SE-372 25 Ronneby, Sweden. Abstract This paper identifies and presents an approach to software component-level testing that in a cost effective way can move defect detection earlier in the development process. The approach includes a test automa...

متن کامل

Prioritizing the creation of unit tests in legacy software systems

Test-Driven Development (TDD) is a software development practice that prescribes writing unit tests before writing implementation code. Recent studies have shown that TDD practices can significantly reduce the number of pre-release defects. However, most TDD research thus far has focused on new development. We investigate the adaptation of TDD-like practices for already-implemented code, in par...

متن کامل

Effects of Test-Driven Development: A Comparative Analysis of Empirical Studies

Test-driven development is a software development practice where small sections of test code are used to direct the development of program units. Writing test code prior to the production code promises several positive effects on the development process itself and on associated products and processes as well. However, there are few comparative studies on the effects of test-driven development. ...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

عنوان ژورنال:

دوره   شماره 

صفحات  -

تاریخ انتشار 2007